//
//  BluetoothCodeType.h
//  HanFengBluetooth
//
//  Created by Ron on 2023/3/2.
//

//#ifndef BluetoothCodeType.h
//#define BluetoothCodeType.h
#import <Foundation/Foundation.h>

/**
 * 错误码
 */
typedef NS_ENUM(NSInteger, BluetoothCodeType) {
    //! 配网成功
    BLE_CODE_TYPE_OK                            = 1000,
    
    //! 鉴权失败
    BLE_CODE_TYPE_CHECK_FAILED                  = -1000,
    
    //! 蓝牙未启动或者没授权
    BLE_CODE_TYPE_NOT_POWER_ON                  = -1001,
    
    //! 当前手机连接的不是目标路由器，只有连接到目标路由器上，才可以校验配置结果
    BLE_CODE_TYPE_CONNECTED_WRONG_SSID          = -1002,
    
    //! 未扫描到设备
    BLE_CODE_TYPE_SCAN_FAILED                   = -1003,
    
    //! 连接设备失败
    BLE_CODE_TYPE_CONNECT_FAILED                = -1004,

    //! 寻找服务失败
    BLE_CODE_TYPE_FIND_SERVICE_FAILED           = -1005,
    
    //! 寻找特征值失败
    BLE_CODE_TYPE_FIND_CHARACTERISTICS_FAILED   = -1006,
    
    //! 写数据失败
    BLE_CODE_TYPE_WRITE_FAILED                  = -1007,
    
    //! 蓝牙断开连接
    BLE_CODE_TYPE_DISCONNECTED                  = -1008,
    
    //! UDP连接错误
    BLE_CODE_TYPE_UDP_CONNECT_FAILED            = -1009,
    
    //! UDP发送数据失败
    BLE_CODE_TYPE_UDP_SEND_FAILED               = -1010,
    
    //! 配置超时
    BLE_CODE_TYPE_TIMEOUT                       = -1020,
    
    //! 上一次配置尚未完成
    BLE_CODE_BUSY                               = -1021,

    //! ssid 规则(非法) 错误, 不支持 ' " , =
    BLE_SSID_RULE_ERROR                         = -2001,
    
    //! 密码错误(密码至少八位或者为空)
    BLE_PASSWORD_RULE_ERROR                     = -2002,
    
    //! sn(业务规则) 错误, SN非10位纯数字均认为非法
    BLE_SN_RULE_ERROR                           = -2003,
    
    //! 采集器不能搜索到目标路由器
    BLE_CODE_TYPE_SSID_ERROR                    = -2004,
    
    //! 采集器不能以设置的密码连接到目标路由器上
    BLE_CODE_TYPE_PASSWORD_ERROR                = -2005,
    
    //! 未知错误
    BLE_CODE_TYPE_OTHER_ERROR                   = -2006,
    
    BLE_CODE_TYPE_CONNECTING                    = 3000,
};

//#endif /* BLE_CODE_TYPE__h */
